package org.business.accounting.beans;

import org.business.accounting.interfaces.BasicProduct;
import org.business.accounting.interfaces.Computer;
import org.business.accounting.interfaces.ComputerOrder;

public class ComputerOrderBean extends BasicOrderBean implements ComputerOrder {

	private Computer item;

	public ComputerOrderBean() {
		this.item = new ComputerBean();
	}

	public double calculatePrice() {
		setPrice(getQty() * item.getPrice());
		return getPrice();
	}

	public BasicProduct getItem() {
		return item;
	}

	public void setItem(BasicProduct item) {
		this.item = (Computer) item;
		calculatePrice();
	}
	

}
